//导入http内置模块
const http = require('http')

// Create a local server to receive data from
const server = http.createServer(function(req, res) {
	res.writeHead(200, {
		'Content-Type': 'application/json'
	});
	res.end(JSON.stringify({
		data: '{"name":"html","price":666}'
	}));
})

server.listen(8080);
